From 3dd40cdc1a785fc73bf5f909a10f3a53bddbeeca Mon Sep 17 00:00:00 2001 From: Henrik Enberg Date: Fri, 27 Apr 2007 21:32:39 +0000 Subject: [PATCH] (rmail-output): Bind buffer-file-coding-system even when rmail-enable-mime is nil. --- lisp/mail/rmailout.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index 26724ee77a5..7224ce91f68 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -169,6 +169,10 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." (while (> count 0) (with-temp-buffer (insert-buffer-substring rmailbuf) + ;; ensure we can write without barfing on exotic characters + (setq buffer-file-coding-system + (or rmail-file-coding-system 'raw-text)) + ;; prune junk headers (rmail-delete-unwanted-fields) (if (not destbuf) ;; The destination file is not being visited, just write -- 2.30.2